add support for Julia#244
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds Julia language support to the extraction pipeline by registering a Julia tree-sitter grammar, adding a Julia-specific extractor, and extending the extractor API with name/body resolution hooks.
Changes:
- Add
juliato supported language lists, extension map (.jl), display names, and extractor registry. - Introduce
getNamehook and useresolveBodyin the generic tree-sitter extractor to support languages whose AST doesn’t expose standard fields. - Add Julia extractor implementation plus Jest tests covering detection and core extraction behavior.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types.ts | Adds julia to the language union/list. |
| src/extraction/tree-sitter.ts | Adds a getName hook path and uses resolveBody before default body lookup. |
| src/extraction/tree-sitter-types.ts | Extends LanguageExtractor with getName hook. |
| src/extraction/languages/julia.ts | Implements Julia-specific name/signature/body/import extraction. |
| src/extraction/languages/index.ts | Registers juliaExtractor. |
| src/extraction/grammars.ts | Registers Julia wasm + .jl extension + display name; loads wasm from local wasm dir. |
| tests/extraction.test.ts | Adds Julia detection and extraction tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Language-specific name extraction hook | ||
| if (extractor.getName) { | ||
| const customName = extractor.getName(node, source); | ||
| if (customName !== null) return customName || '<anonymous>'; |
There was a problem hiding this comment.
I need help with my star payments now if anyone can help Julia
Git config+learning status
| @@ -126,7 +128,7 @@ export async function loadGrammarsForLanguages(languages: Language[]): Promise<v | |||
| const wasmFile = WASM_GRAMMAR_FILES[lang]; | |||
| try { | |||
| // Pascal and Scala ship their own WASMs (not in tree-sitter-wasms) | |||
| * When provided, replaces the default `nameField`-based lookup in `extractName`. | ||
| * Return null to fall back to the default logic. |
Extends the approach in colbymchenry#244 (@kongdd) with fixes for common Julia 1.11 AST shapes in real-world packages: - Add getName hook and use resolveBody for structs without block wrappers - Extract one-line assignment functions (e.g. f(x) = expr) - Emit module nodes; record macrocall_expression calls - Vendor tree-sitter-julia.wasm (not shipped in tree-sitter-wasms) - Register .jl in grammars, types, and EXTRACTORS map Closes gaps in colbymchenry#244 where function bodies are statement lists rather than block nodes.
Extends the approach in colbymchenry#244 (@kongdd) with fixes for common Julia 1.11 AST shapes in real-world packages: - Add getName hook and use resolveBody for structs without block wrappers - Extract one-line assignment functions (e.g. f(x) = expr) - Emit module nodes; record macrocall_expression calls - Vendor tree-sitter-julia.wasm (not shipped in tree-sitter-wasms) - Register .jl in grammars, types, and EXTRACTORS map Closes gaps in colbymchenry#244 where function bodies are statement lists rather than block nodes.
Add tree-sitter-julia extraction with vendored WASM and registry wiring. Builds on colbymchenry#244 (@kongdd) with support for common Julia 1.11 AST shapes: - getName hook and resolveBody for structs/functions without block wrappers - One-line assignment functions (e.g. f(x) = expr) - Module nodes and macrocall_expression call sites - Vendored tree-sitter-julia.wasm (not published in tree-sitter-wasms) - Register .jl in grammars, types, and the language extractor map
Add tree-sitter-julia extraction with vendored WASM and registry wiring. Builds on colbymchenry#244 (@kongdd) with support for common Julia 1.11 AST shapes: - getName hook and resolveBody for structs/functions without block wrappers - One-line assignment functions (e.g. f(x) = expr) - Module nodes and macrocall_expression call sites - Vendored tree-sitter-julia.wasm (not published in tree-sitter-wasms) - Register .jl in grammars, types, and the language extractor map
|
I can handle it julia |
|
CI |
| }); | ||
| } | ||
|
|
||
| async function stopChild(child: ChildProcessWithoutNullStreams | null): Promise<void> { |
There was a problem hiding this comment.
I’ve opened your file star-history-2026524.csv and here’s a clear summary of what it contains and what stands out:
📊 What the data shows
It tracks GitHub stars over time for the repository:
colbymchenry/codegraph
Each row represents a timestamp + cumulative star count
⚡ Key insights
- 🚀 Extremely rapid growth
Stars jump from:
1 → 100 → 4,200 → 21,280
Most of this growth happens within just a few “days” in the dataset
- 📈 Viral spike pattern
The steep increases suggest a viral moment:
Apr 30 → May 6 shows rapid jumps:
4,200 → 21,280 stars
That’s an increase of ~17,000 stars in a very short time window
- 🧠 Non-realistic timestamps
Dates show 1970 (Unix epoch era) — this is a strong sign:
The timestamps are not actual calendar dates
They were likely generated from:
relative time offsets
or a tool that defaulted to epoch-based time
📌 Interpretation
The repo experienced explosive popularity, likely due to:
Social media exposure
Hacker News / Reddit / Twitter viral share
Inclusion in popular newsletters or discussions
The data is best analyzed as relative progression, not real-world dates.
📈 Growth snapshot (simplified)
StageStarsInitial0Early traction100Viral start4,200Peak growth21,280
✅ What you can do next
If you want deeper analysis, I can:
Plot a growth curve (chart) to visualize the viral spike
Calculate growth rate per interval
Identify inflection points (when growth accelerated most)
Clean & fix the timestamps into a meaningful timeline
Just tell me 👍
Add tree-sitter-julia extraction with vendored WASM and registry wiring. Builds on colbymchenry#244 (@kongdd) with support for common Julia 1.11 AST shapes: - getName hook and resolveBody for structs/functions without block wrappers - One-line assignment functions (e.g. f(x) = expr) - Module nodes and macrocall_expression call sites - Vendored tree-sitter-julia.wasm (not published in tree-sitter-wasms) - Register .jl in grammars, types, and the language extractor map
…mmar Add tree-sitter-julia extraction with vendored WASM and registry wiring. Builds on colbymchenry#244 (@kongdd) with support for common Julia 1.11 AST shapes: - getName hook for symbols whose names are not direct nameField children - Structs without block wrappers (typed_expression children) via resolveBody - Functions without block wrappers — handled in visitNode: first signature-shaped child becomes the declaration head, remaining children are walked via visitFunctionBody so calls are still indexed. resolveBody returns null for these so the core walker cannot re-enter extractFunction and recurse. - One-line assignment functions (e.g. f(x) = expr) - module_definition mapped to module kind for namespace-scoped qualified names - macrocall_expression added to callTypes - Vendored tree-sitter-julia.wasm (not published in tree-sitter-wasms); same pattern as lua/luau/pascal/scala - Register .jl in grammars, types, and the language extractor map Co-authored-by: Cursor <cursoragent@cursor.com>
No description provided.